package com.mianyang.zhangsan.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.Builder;
import lombok.Data;

/**
 * @author jiangjr
 * @tablename  sec_video
 */
@TableName(value ="sec_video")
@Data
@Builder
public class SecVideo implements Serializable {
    /**
     * 视频id
     */
    @TableId(type = IdType.AUTO)
    private Long videoId;

    /**
     * 文件编号
     */
    private Long fileId;

    /**
     * 视频名称
     */
    private String videoName;

    /**
     * 视频类型
     */
    private Integer videoType;

    /**
     * 视频描述
     */
    private String videoDesc;

    /**
     * 视频资源
     */
    private String videoSrc;

    /**
     * 视频封面
     */
    private String videoImg;

    /**
     * 视频时长
     */
    private Long videoTime;

    /**
     * 得分
     */
    private Double score;

    /**
     * 点击量
     */
    private Double hit;

    /**
     * 要求类型
     */
    private Integer requireType;

    /**
     * 上传人id
     */
    private Long accountId;

    /**
     * 上传人名称
     */
    private String accountName;

    /**
     * 上传时间
     */
    private Date uploadTime;

    /**
     * 平均分
     */
    private Double avgScore;

    /**
     * 评价人数
     */
    private Double appraiseNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SecVideo other = (SecVideo) that;
        return (this.getVideoId() == null ? other.getVideoId() == null : this.getVideoId().equals(other.getVideoId()))
            && (this.getVideoName() == null ? other.getVideoName() == null : this.getVideoName().equals(other.getVideoName()))
            && (this.getVideoType() == null ? other.getVideoType() == null : this.getVideoType().equals(other.getVideoType()))
            && (this.getVideoDesc() == null ? other.getVideoDesc() == null : this.getVideoDesc().equals(other.getVideoDesc()))
            && (this.getVideoSrc() == null ? other.getVideoSrc() == null : this.getVideoSrc().equals(other.getVideoSrc()))
            && (this.getVideoImg() == null ? other.getVideoImg() == null : this.getVideoImg().equals(other.getVideoImg()))
            && (this.getVideoTime() == null ? other.getVideoTime() == null : this.getVideoTime().equals(other.getVideoTime()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getHit() == null ? other.getHit() == null : this.getHit().equals(other.getHit()))
            && (this.getRequireType() == null ? other.getRequireType() == null : this.getRequireType().equals(other.getRequireType()))
            && (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
            && (this.getAccountName() == null ? other.getAccountName() == null : this.getAccountName().equals(other.getAccountName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getVideoId() == null) ? 0 : getVideoId().hashCode());
        result = prime * result + ((getVideoName() == null) ? 0 : getVideoName().hashCode());
        result = prime * result + ((getVideoType() == null) ? 0 : getVideoType().hashCode());
        result = prime * result + ((getVideoDesc() == null) ? 0 : getVideoDesc().hashCode());
        result = prime * result + ((getVideoSrc() == null) ? 0 : getVideoSrc().hashCode());
        result = prime * result + ((getVideoImg() == null) ? 0 : getVideoImg().hashCode());
        result = prime * result + ((getVideoTime() == null) ? 0 : getVideoTime().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getHit() == null) ? 0 : getHit().hashCode());
        result = prime * result + ((getRequireType() == null) ? 0 : getRequireType().hashCode());
        result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
        result = prime * result + ((getAccountName() == null) ? 0 : getAccountName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", videoId=").append(videoId);
        sb.append(", videoName=").append(videoName);
        sb.append(", videoType=").append(videoType);
        sb.append(", videoDesc=").append(videoDesc);
        sb.append(", videoSrc=").append(videoSrc);
        sb.append(", videoImg=").append(videoImg);
        sb.append(", videoTime=").append(videoTime);
        sb.append(", score=").append(score);
        sb.append(", hit=").append(hit);
        sb.append(", requireType=").append(requireType);
        sb.append(", accountId=").append(accountId);
        sb.append(", accountName=").append(accountName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
